<?php
use frontend\assets\AppAsset;

AppAsset::register($this);
$this->params['breadcrumbs'][] = $this->title;
$image_bath_url = Yii::$app->params['static'];
?>
<?php
AppAsset::addCss($this, $image_bath_url . "/static/pc/css/news-list.css");
?>
<article>
	<div class="w br4 mt50"></div>
	<section class="news_content w mt70">
		<div class="news-center-w">
			<?php if (count($article) > 0){?>
			<div class="title">
				<img data-original="<?=$image_bath_url.'/'.$article_category['category_pic']?>" alt="title">
			</div>
			<div class="banner mt40">
				<a href="<?=\yii\helpers\Url::to(['/article/news-detail','news_id'=>$article[0]['id']]) ?>"> <img
					data-original="<?=$image_bath_url.'/'.$article[0]['article_pic']?>" alt="banner">
					<div class="news_info">
						<h5 class="h5"><?=$article[0]['article_title']?></h5>
						<p><?=$article[0]['summary']?></p>
					</div>
				</a>
			</div>
			<?php }?>

			<!--异步加载文件-->
            <div class="scroll_news">
			<ul class="news_list_box pr" id="news-list">
				<!--<div class="append_list"></div>-->
			</ul>
            </div>
		</div>
	</section>
</article>

<!--加载js-->
<?php
AppAsset::addJs($this,$image_bath_url."/static/common/swiper2/idangerous.swiper2.7.6.min.js");
AppAsset::addJs($this,$image_bath_url."/static/common/dropload.min.js");
AppAsset::addJs($this,$image_bath_url."/static/pc/js/news-list.js");
?>

<?php  $this->beginBlock('json_url') ?>
	var jsonUrl = '<?=\yii\helpers\Url::to(['article/article-list-json'])?>';
	var imgUrl = '<?=Yii::$app->params['static']?>/';
	var linkUrl= '<?=\yii\helpers\Url::to(['article/news-detail'])?>';
<?php $this->endBlock() ?>
<?php $this->registerJs($this->blocks['json_url'], \yii\web\View::POS_END); ?>

